home *** CD-ROM | disk | FTP | other *** search
/ Windows Expert / Windows Expert.iso / others / ole_101.zip / PATRON.ZIP / BLACKBOX.H < prev    next >
Text File  |  1992-04-13  |  2KB  |  80 lines

  1. /*
  2.  * BLACKBOX.H
  3.  *
  4.  * Definitions and prototypes for the BlackBox window.  Note that
  5.  * OLE affects us but having another field in the BLACKBOX structure,
  6.  * adding 3 messages, and adding additional parameters to the Create
  7.  * function.
  8.  *
  9.  * The BlackBox window is somewhat tied to the implementation of Patron.
  10.  *
  11.  *
  12.  * Copyright(c) Microsoft Corp. 1992 All Rights Reserved
  13.  */
  14.  
  15.  
  16. /*
  17.  * BlackBox window structure referenced through a handle in the
  18.  * window extra bytes.
  19.  */
  20.  
  21. typedef struct
  22.     {
  23.     LPOBJECT        pObj;           //OLE:  OBJECT structure for this window.
  24.     BOOL            fOpen;          //OLE:  Indicates if the object is activated.
  25.     BOOL            fUserResize;    //Indicates a WM_SIZE caused by user action.
  26.     RECT            rc;             //Rectangle occupied by this window.
  27.     POINT           ptDrag;         //Dragging click point.
  28.     BOOL            fDrag;          //Flag indicating dragging.
  29.     } BLACKBOX;
  30.  
  31. typedef BLACKBOX *PBLACKBOX;
  32. typedef BLACKBOX FAR *LPBLACKBOX;
  33. #define CBBLACKBOX sizeof(BLACKBOX)
  34.  
  35.  
  36. /*
  37.  * Blackbox file structure.  Also used to pass initial values to
  38.  * HBlackBoxCreate.
  39.  */
  40.  
  41. typedef struct
  42.     {
  43.     RECT        rc;             //Rectangle of object
  44.     WORD        wID;            //ID value of object
  45.     char        szName[40];     //Persistent name of object.
  46.     DWORD       cbObject;       //Size of OLE object--just for demonstration
  47.     } FILEOBJECT;
  48.  
  49. typedef FILEOBJECT FAR *LPFILEOBJECT;
  50. #define CBFILEOBJECT sizeof(FILEOBJECT)
  51.  
  52.  
  53.  
  54.  
  55. #define CBWNDEXTRABLACKBOX  sizeof(HANDLE)
  56. #define GWW_BLACKBOXHMEM    0
  57.  
  58.  
  59. //Window-specific messages
  60. #define BBM_RECTSET         WM_USER+0
  61. #define BBM_RECTGET         WM_USER+1
  62. #define BBM_POBJECTGET      WM_USER+2       //LPOBJECT is read-only.
  63. #define BBM_OBJECTNOTIFY    WM_USER+3
  64. #define BBM_VERBEXECUTE     WM_USER+4
  65.  
  66. //Notification codes
  67. #define BBN_MOVED           0
  68. #define BBN_SIZED           1
  69. #define BBN_CHANGED         2
  70. #define BBN_ACTIVATED       3
  71.  
  72.  
  73. void     FAR PASCAL FileObjectDefaults(LPFILEOBJECT);
  74. HWND     FAR PASCAL HBlackBoxCreate(HWND, LPFILEOBJECT, BOOL, LPOBJECT);
  75. long     FAR PASCAL BlackBoxWndProc(HWND, UINT, UINT, LONG);
  76. DWORD        PASCAL LBlackBoxUserMessage(HWND, WORD, WORD, LONG, PBLACKBOX);
  77. LPRECT   FAR PASCAL PRectWindowGet(HWND, LPRECT, HWND);
  78. WORD     FAR PASCAL WIDGetNext(BOOL);
  79. LPRECT   FAR PASCAL PRectGetNext(LPRECT, BOOL);
  80.